package com.decoratorDesign;

/**
 * @author Vhong
 * @version 1.0
 * 做成处理流/包装流
 */
public class BufferedReader_ extends Reader_{

    private Reader_ reader_;//属性是reader_类型

    public BufferedReader_(Reader_ reader_) {
        this.reader_ = reader_;
    }

    //多次读取文件
    public void readFiles(int num){
        for (int i = 0;i < num;num++ ) {
            reader_.readFile();
        }
    }
    //多次读取字符串数据
    public void readStrings(int num)
    {
        for (int i = 0; i < num; i++) {
            reader_.readString();
        }
    }

}
